perm filename P2BLT.FAI[SS,SYS] blob
sn#743743 filedate 1984-02-29 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 A P2BASE P2SIZE P2WORD UPSEG WENB ACWPRV P2BLT NOPRIV NOGETH
C00004 ENDMK
C⊗;
;⊗ A P2BASE P2SIZE P2WORD UPSEG WENB ACWPRV P2BLT NOPRIV NOGETH
TITLE P2BLT Program to BLT a fixed pattern all over P2's core
A←1 ;an AC
P2BASE←←4000 ;phys addr of start of P2 core
P2SIZE←←400 ;number of pages in P2 core
P2WORD←←P2SIZE*1000 ;number of words in P2 core
UPSEG←←400000 ;first address in upper segment
WENB←←20 ;write enable bit for GETHI
ACWPRV←←40 ;left half priv
PATERN: 1 ;data pattern to be spread over all of P2 core
P2BLT: RESET
MOVSI A,ACWPRV
SETPRV A, ;get needed priv
TLNN A,ACWPRV ;did we get it
JRST NOPRIV ;nope
; MOVE AC,[# OF PAGES,,STARTING PAGE*40+WENB]
MOVE A,[P2SIZE,,P2BASE*40+WENB]
GETHI A, ;map P2's memory to our upper
JRST NOGETH ;failed
MOVE A,PATERN ;get pattern we want to spread in P2 core
MOVEM A,UPSEG ;store in first word of our "segment" (P2 core)
MOVE A,[UPSEG,,UPSEG+1] ;now prepare to spread the word
BLT A,UPSEG+P2WORD-1 ;send the word everywhere
OUTSTR [ASCIZ/Done./]
EXIT
NOPRIV: OUTSTR [ASCIZ/Sorry, you're not privileged to run this program./]
EXIT
NOGETH: OUTSTR [ASCIZ/Failed to map P2 core into upper segment./]
EXIT
END P2BLT